<script>
		var customerId = "A0317";
</script>
<script type="text/javascript" SRC="/js/swfobject.js"></script>
<script type="text/javascript" SRC="/js/jquery.uploadify.min.js"></script>


<script>
	$(function() {	
		$("#uploadify").uploadify({
				'uploader' : '/js/uploadify.swf',
				'script' : "/merchant/product/upload-picture/customerId/"
						+ customerId,
				'cancelImg' : '/images/cancel.png',
				'queueID' : 'fileQueue',
				'auto' : true,
				'multi' : true,

				'sizeLimit' : 4294967296,
				'buttonText' : "browser",
				'queueSizeLimit' : 10,
				'simUploadLimit' : 10,
				'fileDataName' : "picture",
				'fileExt' : '.png;*.jpg;*.gif',
				'fileDesc' : "*.png *.jpg *.gif",				
				'scriptData' : {'sid' : 'dss'},
				"onComplete" : function(event, queueId, fileObj, response, data) {
					var json = "("+response+")";
					json = eval(json);
					for(var i in json){
						alert(json[i]);
					}
				},
				"onAllComplete" : function() {

				},
				"onError" : function(event,queueId,fileObj,errorObj) {
					alert(errorObj.type+" : "+errorObj.info);
				},
				'onSelect': function(e, queueId, fileObj)
				{
				/*alert("唯一标识:" + queueId + "\r\n" +
				"文件名：" + fileObj.name + "\r\n" +
				"文件大小：" + fileObj.size + "\r\n" +
				"创建时间：" + fileObj.creationDate + "\r\n" +
				"最后修改时间：" + fileObj.modificationDate + "\r\n" +
				"文件类型：" + fileObj.type
				);*/
				}
			});
})
</script>

<link rel="stylesheet" href="/css/uploadify.css" type="text/css" />

<div class="position"><a>Home</a> > <a>Main Page</a> > <a>Your Account</a> > CurrentPage</div>
<h4>Product upload</h4>
<div class="tab-div">
<form method="post" action="/merchant/product/upload-picture/customerId/A0317" enctype="multipart/form-data" id="uploadForm">
	<div class="row height25">
			<div class="left">选择文件：</div><div class="middle">
			<input type="file" name="picture"/></div><div class="right">支持.jpg,.png 文件</div>
	</div>
	<div class="row height25">
			<div class="left"></div><div class="middle"><input type="submit" class="button" name="sbt" value="上传"/></div><div class="right"></div>
	</div>
</form>
</div>

<div id="uploadFileDialog"  title="images upload">
	<div id="fileQueue"></div>
	<input type="file" id="uploadify" class="half" value="" name="uploadify"/>
</div>